﻿using Avalonia;
using Avalonia.Controls.ApplicationLifetimes;
using SD.App.Desktop.Views;

namespace SD.Desktop;

public class SDApplication : App
{
    public SDApplication()
    {
        Name = "AtomUI SD";
    }

    public override void OnFrameworkInitializationCompleted()
    {
        switch (ApplicationLifetime)
        {
            case IClassicDesktopStyleApplicationLifetime desktop:
                desktop.MainWindow = CreateLoginWindow();
                desktop.MainWindow.Title = Name;
                break;
                // case ISingleViewApplicationLifetime singleView:
                //     singleView.MainView = new MainView();
                //     break;
        }

        base.OnFrameworkInitializationCompleted();
    }
}